IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[GlobalData]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
   DROP TABLE [dbo].[GlobalData]
GO

CREATE TABLE [dbo].[GlobalData](
	[RegistrationFees] [smallmoney] NOT NULL,
	[CRNumber] [bigint] NOT NULL
) ON [PRIMARY]

GO

GRANT SELECT,INSERT,DELETE,UPDATE ON dbo.GlobalData TO hms_usr
GO



IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id =
object_id(N'dbo.SP_GetGlobalData') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
   DROP PROCEDURE dbo.SP_GetGlobalData
GO

/*----------------------------------------------------------------------
'Created By : Swati
'Created On : 10/10/2008
'SP Name    : dbo.SP_GetGlobalData
'Used In    : 
'------------------------------------------------------------------------
'Modification Log  
'------------------------------------------------------------------------
'Created By        Modified By         Remarks                             
'-----------       ------------        ----------------------------------
'                                                                          
'----------------------------------------------------------------------*/

CREATE PROCEDURE [dbo].[SP_GetGlobalData]
AS
	SELECT
        RegistrationFees,
        CRNumber
	FROM GlobalData

GRANT EXEC ON dbo.SP_GetGlobalData TO hms_usr
GO


